<?php
	$output = null;
			if(have_posts())
           	{
           		$j=1;
           		$image_rs = new  SimpleImage();
           		while (have_posts())
           		{
           			the_post();
           			$postID = get_the_ID();
					$title = get_the_title($postID);
					$perlink = get_permalink($postID);
					$alt = db_vietnamese_slug($title);
					$thumbnail = db_get_post_meta($postID, $wpdb->prefix.'thumbnail');
					if($thumbnail)
						$thumbnail = db_resizeImage($image_rs, $thumbnail, 90, 71);
					$output.='
					<li>
                        	<a href="'.$perlink.'" class="name-news" title="'.$title.'">'.db_shortDesc($title, 80).'</a>
                        	<div class="box-img">
                        		<a href="'.$perlink.'" title="'.$title.'">
                            		<img alt="'.$alt.'" src="'.$thumbnail.'" />
                            	</a>
                            </div>
                            <div class="box-info">
                            	<span class="date">'.unix_to_gmt_sevent2(get_the_date()).'(GMT+7)</span>
                            	<p>
                            	'.db_shortDesc(get_the_content(), 200).'
                                </p>
                                <br/>
                                <a class="readmore" href="'.$perlink.'" title="'.$title.'">[+] Read More...</a>
                            </div>
                        </li>
					';	
           		}
           		echo $output;
           	} 
           	else 
           	{
           		echo '<li>No post!</li>';
           	}
           	
?>
						 